﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Tools;

namespace Web
{
    public class WMS_UI : System.Web.UI.Page
    {
        public static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        protected override void OnPreInit(EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CookieHelper.GetCookie("username") == null || CookieHelper.GetCookie("role") == null)
                    Response.Redirect("~/Admin/Error.htm");
               
                string currenturl = Request.RawUrl;
                log.Debug("来自IP" + Request.UserHostAddress + "的用户" + CookieHelper.GetCookie("username") + "正在访问:" + currenturl + "页面");
                
                base.OnPreInit(e);
            }
        }

    }
}